package com.abc.invoke.client.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;

import com.abc.invoke.services.interfaces.AccessControlInterface;
import com.abc.invoke.services.interfaces.UserInterface;

@Configuration
public class InvokerClientConfig {

	/*@Bean
	public HttpInvokerProxyFactoryBean userService(){
		HttpInvokerProxyFactoryBean invokerProxy=new HttpInvokerProxyFactoryBean();
		invokerProxy.setServiceUrl("http://localhost:8080/springInvoker-server/service/userService");
		invokerProxy.setServiceInterface(UserInterface.class);
		return invokerProxy;
	}*/
	
	@Bean
	public HttpInvokerProxyFactoryBean accessService(){
		HttpInvokerProxyFactoryBean invokerProxy=new HttpInvokerProxyFactoryBean();
		invokerProxy.setServiceUrl("http://localhost:8080/client_service/service/accessService");
		invokerProxy.setServiceInterface(AccessControlInterface.class);
		return invokerProxy;
	}
}
